package 软件工程实验三.A1.A14;//Source file: E:\\Projects\\RationRoseProject\\GenerateCode\\Order.java


import 软件工程实验三.A1.A14.pay.Payment;

import java.util.Date;

public class Order
{
   private Date createDate;

   public Date getCreateDate() {
      return createDate;
   }

   public OrderEnum getStatus() {
      return status;
   }

   public Order(Date createDate) {
      this.createDate = createDate;
      this.status = OrderEnum.CREATE;
   }

   /**
    * 0:CREATE
    * 1:PAID
    * 2:SHIPPING
    * 3:DELIVERED
    * 4:CANCEL
    */
   private OrderEnum status;
   public OrderDetail theOrderDetail;

   public OrderDetail getTheOrderDetail() {
      return theOrderDetail;
   }

   public void setTheOrderDetail(OrderDetail theOrderDetail) {
      this.theOrderDetail = theOrderDetail;
   }

   /**
    * @roseuid 6719EB710166
    */
   public Order() 
   {
    
   }

   public void checkout(Payment payment) {
      payment.amount = theOrderDetail.calculateSubTotal();
      payment.pay();
   }

   public void delivery(Customer customer) {
      System.out.println("收货人：");
      System.out.println(customer);
   }
}
